import logging
from django.conf import settings
from django.core.mail import send_mail
from celery_tasks.main import celery_app

logger = logging.getLogger('django')


@celery_app.task(name='send_email_active')
def send_email_active(email_addr, message):
    print('异步 OwO 异步')
    subject = '美多商城邮箱激活'
    message = message
    from_email = '美多官方<w978309462@163.com>'
    recipient_list = [email_addr]
    send_mail(subject=subject, message="", from_email=from_email, recipient_list=recipient_list, html_message=message)
    print('Owo 异步 owO')
